package www.openteam.com.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by OT on 2018-01-09.
 */

public class IPQCProduce {


    /**
     * status : 1
     * info : 成功
     * data : {"data":[{"code":"1010","name":"CTP版"},{"code":"1020","name":"分纸"},{"code":"1030","name":"切纸"},{"code":"2010","name":"印刷"},{"code":"3000","name":"烫1"},{"code":"3003","name":"对裱-1"},{"code":"3005","name":"裁切-1"},{"code":"3010","name":"UV"},{"code":"3020","name":"上油"},{"code":"3025","name":"上膜"},{"code":"3030","name":"烫-2"},{"code":"3040","name":"局部UV"},{"code":"3050","name":"丝印"},{"code":"3060","name":"压纹"},{"code":"3062","name":"模切-0"},{"code":"3063","name":"对裱-2"},{"code":"3065","name":"烫"},{"code":"3100","name":"上吸塑油"},{"code":"3290","name":"表面处理后印刷"},{"code":"3300","name":"击-1"},{"code":"3310","name":"模切-2"},{"code":"3315","name":"裁切-"},{"code":"3320","name":"裱浪"},{"code":"3350","name":"反面水印"},{"code":"3380","name":"精品对裱"},{"code":"3395","name":"丝印-1"},{"code":"3510","name":"击"},{"code":"3512","name":"丝印2"},{"code":"3514","name":"烫2"},{"code":"3515","name":"糊盒手工（轧前）"},{"code":"3517","name":"正反对裱"},{"code":"3520","name":"模切"},{"code":"3530","name":"去废"},{"code":"3533","name":"冲孔"},{"code":"3536","name":"开槽（A）"},{"code":"3540","name":"丝印（轧盒后）"},{"code":"3545","name":"烫（轧盒后）"},{"code":"3550","name":"精品对裱(轧后)"},{"code":"3600","name":"精品手工（糊边前）"},{"code":"3710","name":"贴窗"},{"code":"3720","name":"糊边"},{"code":"3730","name":"糊盒手工"},{"code":"3735","name":"成品组装"},{"code":"3740","name":"打钉"},{"code":"3790","name":"模切（B)"},{"code":"3900","name":"彩盒全检"},{"code":"3905","name":"击-2"},{"code":"4001","name":"单张裁切"},{"code":"4005","name":"打钉(裁切后)"},{"code":"4010","name":"折页"},{"code":"4015","name":"冲孔（裁切后）"},{"code":"4030","name":"装钉"},{"code":"4040","name":"胶装"},{"code":"4070","name":"笔记本"},{"code":"4890","name":"成品裁切"},{"code":"4893","name":"打圆角"},{"code":"4895","name":"说明书手工"},{"code":"4900","name":"说明书全检"},{"code":"4905","name":"糊边B"},{"code":"5010","name":"纸品面检"},{"code":"5110","name":"开槽"},{"code":"5111","name":"精品手工"},{"code":"5120","name":"模切(手工后)"},{"code":"5130","name":"烫（手工后）"},{"code":"5210","name":"裱衬纸"},{"code":"5220","name":"外盒成型"},{"code":"5230","name":"内盒成型"},{"code":"5240","name":"精品组装"},{"code":"5990","name":"精品检验"},{"code":"6010","name":"裁切3D"},{"code":"6020","name":"贴合3D"},{"code":"6030","name":"热轧3D"},{"code":"6040","name":"冲孔3D"},{"code":"6050","name":"组装3D"},{"code":"6990","name":"成品检验包装3D"},{"code":"7010","name":"协包组装"},{"code":"7990","name":"协包检验包装"},{"code":"8000","name":"外发加工"},{"code":"8001","name":"裁切"},{"code":"8020","name":"说明书全检（背胶后）"}]}
     */

    private int status;
    private String info;
    private DataBeanX data;

    public static List<IPQCProduce> arrayIPQCProduceFromData(String str) {

        Type listType = new TypeToken<ArrayList<IPQCProduce>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public DataBeanX getData() {
        return data;
    }

    public void setData(DataBeanX data) {
        this.data = data;
    }

    public static class DataBeanX {
        private List<DataBean> data;

        public static List<DataBeanX> arrayDataBeanXFromData(String str) {

            Type listType = new TypeToken<ArrayList<DataBeanX>>() {
            }.getType();

            return new Gson().fromJson(str, listType);
        }

        public List<DataBean> getData() {
            return data;
        }

        public void setData(List<DataBean> data) {
            this.data = data;
        }

        public static class DataBean {
            /**
             * code : 1010
             * name : CTP版
             */

            private String code;
            private String name;

            public static List<DataBean> arrayDataBeanFromData(String str) {

                Type listType = new TypeToken<ArrayList<DataBean>>() {
                }.getType();

                return new Gson().fromJson(str, listType);
            }

            public String getCode() {
                return code;
            }

            public void setCode(String code) {
                this.code = code;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }
        }
    }
}
